package com.yin.good.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.yin.good.entity.GoodInfoEntity;
import com.yin.good.entity.GoodTypeEntity;
import com.yin.base.BaseEntity;

import lombok.Data;

/**
*@author LSY
*Time: 2018年12月26日下午5:44:08
*
*
*/
@Data
@Entity
@Table(name = "good_infos")
public class GoodInfoEntity extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "tg_id")
    private Long id;

    @Column(name = "tg_title")
    private String title;

    @Column(name = "tg_price")
    private double price;

    @Column(name = "tg_unit")
    private String unit;

    @Column(name = "tg_order")
    private int order;

    @OneToOne
    @JoinColumn(name = "ty_type_id")
    private GoodTypeEntity type;
	
}
